<?php
namespace Admin\Service;
/**
 * 系统设置
 *
 * @package         YDCMS
 * @author          QQ:644157559 <644157559@qq.com>
 * @version         $Id: SystemService.class.php v1.0 2014-06-13 17:27:03 $
 */
class SystemService extends CommonService{
    
    /**
     * 更新自定义文档属性
     * @param type $data
     * @return type
     */
    public function upConAtt($data) {
        $att = $data['att'];
        $attname = $data['attname'];
        $sortid = $data['sortid'];
        if(!isArrayAndNotEmpty($att) || !isArrayAndNotEmpty($attname) || !isArrayAndNotEmpty($sortid)){
            return $this->errorResultReturn("非法操作");
        }
        $M = M("Conatt");
        for($i = 0; $i < count($att); $i++){
            $data = array('sortid' => $sortid[$i], "attname" => $attname[$i]);
            $M->where(array('att' => $att[$i]))->setField($data);
        }
        
        return $this->resultReturn(true);
    }
    protected function getModelName() {
        return 'System';
    }
}
